﻿
Partial Class About
    Inherits System.Web.UI.Page

    Private mcookie_language As HttpCookie

    Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim mpLabel As Label
        mpLabel = CType(Master.FindControl("Lbl_Introduce"), Label)
        '-------------------------------------------
        If Request.Cookies("cookie_language") Is Nothing Then
            mcookie_language = New HttpCookie("cookie_language", "E")
            mcookie_language.Expires = DateTime.Now.AddDays(30)
            Response.Cookies.Add(mcookie_language)
        End If
        '------------------------------------------
        Select Case Request.Cookies("cookie_language").Value
            Case "E"
                Panel_EN.Visible = True
                Panel_VN.Visible = False
                mpLabel.Text = "About us"

            Case Else
                Panel_EN.Visible = False
                Panel_VN.Visible = True
                mpLabel.Text = "Giới thiệu"
        End Select

    End Sub
End Class
